package cn.edu.nju.ws.sview.views;

import java.sql.Timestamp;

import org.dom4j.Document;

import cn.edu.nju.ws.sview.cache.MessageCache;

public class Message {
	private int id=-1;
	private String title = null;
	private Timestamp time=null;
	private User sender = null;
	private User receiver = null;
	private String content = null;
	private boolean isRead = false;
	
	public Message(int id){
		this.id = id;
	}
	public static Document getReceiveMessageByUserId(int userID){
		Document doc = null;
		try {
			doc = MessageCache.getInstance().getMessages(userID);
		} catch (Throwable e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return doc;
	}
}
